package nacos.example.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope
@RestController
public class ExampleController {

    @Value("${config.value:from server}")
    String value;

    @Value("${config.value2:from server 2}")
    String value2;


    @Value("${config.test:from server 3}")
    String test;

    @GetMapping("/")
    public Object test() {
        return value + "#" + value2 + "#" + test;
    }
}
